home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr49 / 109_01.zip / XSDIR.ASM < prev    next >
Assembly Source File  |  1993-06-26  |  14KB  |  557 lines

  1.     TITLE    'Extended Sorted Directory'
  2.       ;++ ****************************************
  3.     ;
  4.     ;$$ XSDIR        written by:    S.J.Singer
  5.     ;            modified by:    H.R.Moran Jr.
  6.     ;
  7.     ; Original file was XDIR by S.J.Singer CPMUG vol 24
  8.     ;
  9.     ; XSDMAC.LIB is the same as MACRO.LIB (  S.J.Singer CPMUG vol 24)
  10.     ; with two exeptions. The removal of a conditional assembly
  11.     ; in the MOVE macro (which did not work properly) and
  12.     ; the addition of macro AMATCH (ambiguous match) which was but
  13.     ; is no longer used by this program.
  14.     ;
  15.     ; Modifications:
  16.     ;
  17.     ;    1) Allow specification of ambiguous file names.
  18.     ;    2) Count remaining space correctly even if not
  19.     ;       all files are displayable.
  20.     ;    3) Made useable on double density or non-standard diskettes.
  21.     ;    4) Four column format instead of three.
  22.     ;    5) Show indication of the number of directory entries used.
  23.     ;    6) Comment more thoroughly to ease further modification.
  24.     ;
  25.     ;
  26.     ; XSDIR is a CPM utility that displays
  27.     ; a disk directory in a more readable form
  28.     ; than DIR. The directory is read from the
  29.     ; specified drive, sorted then displayed in a
  30.     ; 4 column format. Both the file names and
  31.     ; file sizes in 1K groups are displayed.
  32.     ; XSDIR is written in the Digital Research
  33.     ; Macrossembler and uses a large number of Macros.
  34.     ; these are contained in a library called
  35.     ; MACRO.LIB (written by S.J.Singer) which
  36.     ; is required if the program is to be re-assembled.
  37.     ;
  38.     ;
  39.     ;    COMMAND FORMAT
  40.     ;
  41.     ; XSDIR        Display Directory of Logged disk
  42.     ; XSDIR {<drive>:}{<ambiguous file name}
  43.     ;
  44.     ; Where items enclosed in braces are optional and
  45.     ; items enclosed in <> are classes.
  46.     ;
  47.     ;
  48.     ; examples:
  49.     ;    XSDIR ?ABC*.COM
  50.     ;
  51.     ; Include all files whose type is .COM and
  52.     ; whose second,third and fourth characters
  53.     ; of their names are A,B,C respectively.
  54.     ;
  55.     ;    XSDIR B:
  56.     ;
  57.     ; Include all files on drive B.
  58.     ;
  59.     ;    XSDIR B:*.ASM
  60.     ;
  61.     ; Include all files on drive B whose type
  62.     ; is .ASM.
  63.     ;
  64.     ;-- ****************************************
  65.     ;
  66.     MACLIB    XSDMAC        ;INCLUDE MACRO LIBRARY
  67.     PAGE
  68.     ;
  69.     ;
  70.     ; Parameter Definitions
  71.     ;
  72.     ;----- HARDWARE SPECIFIC PARAMETERS -----
  73.     ;
  74. SMALL    EQU    0        ;64 wide CRT is false (1 => true)
  75. CRTLEN    EQU    20        ;Number of physical lines on console device
  76. DSKSIZ    EQU    241        ;Number of kbytes on a disk
  77.     ;
  78.     ;----- END HARDWARE SPECIFIC  PARAMETERS -----
  79.     ;
  80. LINES    EQU    CRTLEN-4    ;Lines per page on display
  81. ENTRIES    EQU    128        ;Max number of directory entries
  82.     ;
  83. TBUFF    EQU    80H        ;Transient buffer
  84. TFCB    EQU    5CH        ;Transient FCB
  85. BDOS    EQU    5        ;Entry to Basic Disk Operating system
  86. BOOT    EQU    0        ;Entry to warmboot in BIOS
  87.     ;
  88.     ; Make sure we can't point past the directory pointer table
  89.     ;
  90. DIRLEN    EQU    2*(ENTRIES+1)        ;Pointer table length
  91.     ;
  92.     ;
  93.     PAGE
  94.     ;
  95.     ORG    100H        ;CP/M compatible origin
  96.     ;
  97. XSDIR:
  98. BEGIN:    LXI    H,0
  99.     DAD    SP        ;Save CCP Stack-pointer
  100.     SHLD    CCPSTK
  101.     ;
  102.     LXI    SP,LCLSTK    ;Init Local Stack-pointer
  103.     ;
  104. DIR:    LDA    TFCB+1        ;1'st char of ambiguous file name
  105.     STA    ALLF        ;Save as a flag for the
  106.                 ;bytecount print format routine
  107.     CPI    ' '
  108.     JNZ    ADDED        ;Was a name match specified ?
  109.                 ;No, make a match anything FCB.
  110.     FILL    TFCB+1,TFCB+12,'?'
  111.     FILL    TFCB+13,TFCB+32
  112. ADDED:    MVI    A,'?'
  113.     STA    TFCB+12        ;Force match of all extents
  114.     LDA    TFCB        ;A=drive specifier
  115.     ORA    A
  116.     JNZ    SPECDRIV    ;Was drive explicitly specified ?
  117.     DISKIO    ?DRIVE        ;No,use the default drive
  118.     INR    A
  119. SPECDRIV:
  120.     ADI    'A'-1        ;Make it ASCII.
  121.     STA    DRIVEID        ;Save the ASCII drive id.
  122.     PRINT    <CR,LF>
  123.     XRA    A
  124.     STA    COUNT        ;Count of Directory entries=0
  125.     FILL    PDIR,PDIR+DIRLEN;Zero the pointer table
  126.     LXI    H,DIRBUF     ;HL=.(Directory buffer)
  127.     SHLD    OUTBPTR        ;OUTBPTR=.(Directory buffer)
  128.     LXI    H,PDIR        ;HL=.(Pointer table)
  129.     SHLD    IPOINT        ;IPOINT=.(Pointer table)
  130.     ;
  131.     ; Read the specified portion of the
  132.     ; directory into a buffer. If the Extent
  133.     ; is non-zero then replace the current
  134.     ; entry in the buffer thereby adding to its
  135.     ; allocation count.
  136.     ;
  137.     DISKIO    SEARCH,TFCB    ;Search for 1'st match in directory
  138.     CPI    255
  139.     JZ    ENDFIL        ;Was a match found ?
  140.     ANI    3        ;Yes,continue
  141.     JMP    DIR6
  142.     ;
  143. DIR4:    DISKIO    SERNXT,TFCB    ;Search for next match in directory
  144.     CPI    255
  145.     JZ    SORT        ;Was another matching entry found ?
  146.     ANI    3        ;Yes
  147. DIR6:    LHLD    OUTBPTR
  148.     XCHG            ;DE=destination pointer
  149.     LXI    H,TBUFF        ;Calculate pointer to entry in TBUFF
  150.     ADD    A
  151.     ADD    A
  152.     ADD    A
  153.     ADD    A
  154.     ADD    A        ;Multiply byte pointer by entry size (32)
  155.     ADD    L        ;Construct pointer to entry
  156.     MOV    L,A
  157.     JNC    DIR8
  158.     INR    H
  159. DIR8:    SHLD    INBPTR    ;Save pointer to entry
  160.     INX    H    ;bypass 1'st byte (0 or 0E5H)
  161.     SAVE    H,D
  162.     LXI    D,11
  163.     DAD    D    ;HL=.(extent byte)
  164.     MOV    A,M    ;A=extent byte
  165.     ORA    A
  166.     JZ    DIR10    ;Is this the zeroth extent ?
  167.     LXI    H,0    ;No, search for same name and 'switch' entries
  168.     SHLD    J    ;J=0 (Initialize index)
  169. DIR9:    DLOAD    PDIR,J    ;HL=PDIR(J)
  170.     DJZ    DIR10    ;Is the table empty ?
  171.     XCHG        ;No,search for a match with current entry
  172.     LHLD    INBPTR    ;HL=.(current entry)
  173.     SAVE    D,H
  174.     INX    H    ;bypass drive id
  175.     MATCH    ,,11    ;Compare name and type (11 chars)
  176.     RESTORE    H,D
  177.     JZ    SWITCH    ;Do they match ?
  178.             ;No, compare with next saved entry
  179.     INDEX    J,2    ;J=J+2 (bytes i.e. 1 entry)
  180.     JMP    DIR9
  181.     ;
  182. SWITCH:    INX    H    ;bypass drive id
  183.     MOVE    ,,15    ;Overwrite the old saved entry
  184.     RESTORE    H
  185.     JMP    DIR4    ;Read another entry from Disk Directory
  186.     ;
  187. DIR10:    RESTORE    D,H
  188.     MOVE    ,,15    ;Save the current entry
  189.     LDA    COUNT
  190.     INR    A
  191.     STA    COUNT    ;COUNT=COUNT+1
  192.     LHLD    OUTBPTR
  193.     DSTORE    0,IPOINT;Update pointer table to reflect new entry
  194.     INDEX    OUTBPTR,16    ;OUTBPTR=OUTBPTR+16 (bytes  i.e. 1 entry)
  195.     INDEX    IPOINT,2;IPOINT=IPOINT+2 (bytes i.e. 1 entry)
  196.           JMP    DIR4    ;Read another entry from Disk Directory
  197.     ;
  198.     ; This routine prints the directory
  199.     ; in 4 columns. The number of lines
  200.     ; Printed is controlled by the variable LINES.
  201.     ; All matched directory names are present
  202.     ; in the table but only a maximum of
  203.     ; 4 times LINES will be printed.
  204.     ;
  205. DIR14:    LXI    H,0
  206.     SHLD    W        ;Initialize the count of kbytes on disk.
  207.     SHLD    I        ;Initialize the pointer index
  208. DIR16:    DLOAD    PDIR+LINES*0,I    ;pointer to column 1
  209.     DJZ    ENDFIL        ;Exit if pointer is zero (i.e. empty)
  210.     CALL    DIR20        ;Print column 1 entry
  211.     ;
  212.     IF SMALL = 1        ;64 wide CRT ?
  213.     PRINT    <'|'>        ;Yes, print short spacer
  214.     ELSE            ;otherwise No
  215.     PRINT    <' | '>        ;print spacer
  216.     ENDIF
  217.     ;
  218.     DLOAD    PDIR+LINES*2,I    ;pointer to column 2
  219.     DJZ    DIR18        ;bypass if pointer is zero (i.e. empty)
  220.     CALL    DIR20        ;Print column 2 entry
  221.     ;
  222.     IF SMALL = 1        ;64 wide CRT ?
  223.     PRINT    <'|'>        ;Yes, print short spacer
  224.     ELSE            ;otherwise No
  225.     PRINT    <' | '>        ;print spacer
  226.     ENDIF
  227.     ;
  228.     DLOAD    PDIR+LINES*4,I    ;pointer to column 3
  229.     DJZ    DIR18        ;bypass if pointer is zero (i.e. empty)
  230.     CALL    DIR20        ;Print column 3 entry
  231.     ;
  232.     IF SMALL = 1        ;64 wide CRT ?
  233.     PRINT    <'|'>        ;Yes, print short spacer
  234.     ELSE            ;otherwise No
  235.     PRINT    <' | '>        ;print spacer
  236.     ENDIF
  237.     ;
  238.     DLOAD    PDIR+LINES*6,I    ;pointer to column 4
  239.     DJZ    DIR18        ;bypass if pointer is zero (i.e. empty)
  240.     CALL    DIR20        ;Print column 4 entry
  241. DIR18:    PRINT    CRLF,$
  242.     INDEX    I,2        ;I=I+2 (bytes i.e. 1 entry)
  243.     LXI    D,LINES*2    ;Check index limit
  244.     CPHL
  245.     JNZ    DIR16        ;Is console screen full ?
  246.     MVI    A,1        ;Yes, set Screen Full Flag
  247.     STA    SFF        ;SFF=1
  248.     ;
  249. DIR16A:    DLOAD    PDIR+LINES*6,I    ;No, Add in sizes of remaining files
  250.     DJZ    ENDFIL
  251.     CALL    DIR20A
  252.     INDEX    I,2
  253.     LXI    D,2*ENTRIES
  254.     CPHL
  255.     JNZ    DIR16A        ;Max entries exceeded ?
  256.     JMP    ENDFIL        ;Yes, finish up and exit
  257.     ;
  258.     ;
  259.     ; Subroutine to print a single
  260.     ;    Directory entry
  261.     ;
  262. DIR20:    MVI    C,8        ;C=name length
  263. DIR22:    SAVE    B,H        ;Save registers from BDOS
  264.     MVI    C,2        ;C=print console function
  265.     MOV    E,M        ;E=char to be printed
  266.     CALL    BDOS
  267.     RESTORE    H,B        ;Restore the registers
  268.     INX    H        ;Increment the char pointer
  269.     DCR    C        ;Decrement the character count
  270.     JNZ    DIR22        ;Has the name been fully printed ?
  271.     ;            ;Yes
  272.     IF SMALL = 0
  273.     SAVE
  274.     PRINT    <' '>        ;Print spacer
  275.     RESTORE
  276.     ENDIF
  277.     ;
  278.     MVI    C,3        ;Print file type
  279. DIR22B:    SAVE    B,H
  280.     MVI    C,2
  281.     MOV    E,M
  282.     CALL    BDOS
  283.     RESTORE    H,B
  284.     INX    H
  285.     DCR    C
  286.     JNZ    DIR22B        ;Has type been fully printed ?
  287.     ;
  288.     JMP    DIR24        ;Yes,print file size
  289.     ;
  290.     ; Add in sizes of files which won't fit on screen
  291.     ;
  292. DIR20A:    LXI    B,11
  293.     DAD    B        ;HL=.(extent byte)
  294.     ;
  295.       ; Accumulate the file size in kbytes
  296.     ;
  297. DIR24:    MOV    A,M        ;A=extent byte
  298.     XCHG            ;DE=.(entry)
  299.     MVI    H,0
  300.     MOV    L,A        ;HL=extent byte
  301.     LDA    FCBCNT
  302.     ADD    L
  303.     INR    A
  304.     STA    FCBCNT
  305.     DAD    H
  306.     DAD    H
  307.     DAD    H
  308.     DAD    H        ;HL=HL*16 kbytes per extent
  309.     INX    D
  310.     INX    D
  311.       INX    D        ;DE=.(number of records byte)
  312.     LDAX    D        ;A=number of records in final extent
  313.     RRC
  314.     RRC
  315.     RRC            ;A=A/8 records per kbyte
  316.     PUSH    PSW
  317.     ANI    1FH        ;Round up if there is a fractional kbyte
  318.     ADD    L        ;(note: no carrys are possible)
  319.     MOV    L,A        ;HL=# of full kbytes in file
  320.     POP    PSW
  321.     ANI    0E0H        ;A=number of records mod 8
  322.     JZ    DIR26        ;Does final extent contain a partial kbyte ?
  323.     INX    H        ;Yes, add one kbyte for the partial one
  324. DIR26:    LDA    SFF        ;A=Screen Full Flag
  325.     ORA    A    ;
  326.     JNZ    DIR30A        ;Is the console screen full ?
  327.                 ;No, continue displaying
  328.     ;Print spacing based on how many digits in the kbyte count
  329.     ;
  330.     SAVE    H
  331.     LXI    D,100
  332.     CPHL
  333.     JM    DIR26A
  334.     PRINT    ' '        ; 3 digits => 1 space
  335.     JMP    DIR30
  336.     ;
  337. DIR26A:    RESTORE    H
  338.     SAVE    H
  339.     LXI    D,10
  340.     CPHL
  341.     JM    DIR28
  342.     PRINT    '  '        ; 2 digits => 2 spaces
  343.     JMP    DIR30
  344.     ;
  345. DIR28:    PRINT    '   '        ; 1 digit  => 3 spaces
  346.     ;
  347.     ; Add kbytes in this file to total kbytes counted
  348.     ;
  349.     ;
  350. DIR30:    POP    H
  351.     PUSH    H
  352.     XCHG
  353.     LHLD    W
  354.     DAD    D
  355.     SHLD    W        ;W=W + kbytes in this file
  356.     POP    H
  357.     DECOUT    ;Print the number of kbytes in this file as decimal
  358.     RET
  359.     ;
  360. DIR30A:    PUSH    H
  361.     XCHG
  362.     LHLD    W
  363.     DAD    D
  364.     SHLD    W        ;W=W + kbytes in this file
  365.     POP    H
  366.     RET
  367.     ;
  368.     ;This is the exit point from the program.
  369.     ;Print the number of files and the space remaining.
  370.     ;Restore the CCP stack pointer and return to CCP.
  371.     ;
  372. ENDFIL:    PRINT    <CR,LF>
  373.     PRINT    <'Drive - '>
  374.     CHAROUT    DRIVEID        ;Print ASCII of specified or default disk
  375.     PRINT    <' '>
  376.     DECOUT    COUNT
  377.     PRINT    ' Files ('
  378.     DECOUT    FCBCNT
  379.     PRINT    ' entries) '
  380.     LHLD    W
  381.     LDA    ALLF
  382.     CPI    ' '
  383.     JNZ    SOME        ;Were all files printed?
  384.     LXI    B,DSKSIZ    ;Yes, calculate remaining space
  385.     MOV    A,C
  386.     SUB    L
  387.     MOV    L,A
  388.     MOV    A,B
  389.     SBB    H
  390.     MOV    H,A
  391. SOME:    DECOUT        ;Print either sum of files matched or remaining space
  392.     LDA    ALLF
  393.     CPI    ' '
  394.     JNZ    SOME2        ;Were all files printed?
  395.                 ;Yes
  396.                 ;Show the space remaining on disk.
  397.     IF SMALL = 1
  398.     PRINT    <'K bytes remaining',CR,LF>
  399.     ELSE
  400.     PRINT    <'K bytes remaining on disk',CR,LF>
  401.     ENDIF
  402.     ;
  403.     JMP    EF1
  404.                 ;show sum of files printed
  405.                 ;if not all files were printed
  406. SOME2:
  407.     IF SMALL = 1
  408.     PRINT    <'K bytes matched',CR,LF>
  409.     ELSE
  410.     PRINT    <'K bytes in the matched files',CR,LF>
  411.     ENDIF
  412.     ;
  413. EF1:    LHLD    CCPSTK
  414.     SPHL            ;Restore the CCP stack-pointer
  415.     RET            ;Return to CCP without reboot.
  416.     ;
  417.     ;This section does the actual sorting
  418.     ;of the directory. During the
  419.     ;input of the directory names,
  420.     ;a table of address pointers PDIR
  421.     ;was constructed. The SORT routine
  422.     ;sorts the address pointers
  423.     ;rather than the actual directory. 
  424.     ;this is an implementation of
  425.     ;C. A. R. Hoare's QUICKSORT algorithm.
  426.     ;The algorithm is very fast and generally
  427.     ;useful, however caution
  428.     ;should be used with large files.
  429.     ;The algorithm is recursive and
  430.     ;the stack space required is proportional
  431.     ;to the number of items to be sorted.
  432.     ;
  433. SORT:    LDA    COUNT        ;A=number of entries found
  434.     ORA    A
  435.     JZ    ENDFIL        ;Were any entries found ?
  436.     DCR    A        ;Yes, A=number of entries-1
  437.     LXI    H,0
  438.     MOV    L,A
  439.     DAD    H        ;HL=2*(number of entries-1)
  440.     SHLD    LAST        ;End of Array is HL
  441.     LXI    H,0
  442.     SHLD    FIRST        ;Start of Array is zero
  443.     LXI    H,-1
  444.     PUSH    H        ;Flag stack as being empty
  445.     LHLD    FIRST
  446.     PUSH    H
  447.     LHLD    LAST
  448.     PUSH    H        ;Stack contains first and last indices
  449.     ;
  450.     ;Pop stack and recursively call SPLIT until stack is empty
  451.     ;
  452. SORT2:    POP    H
  453.     MOV    A,H
  454.     CPI    0FFH
  455.     JZ    DIR14        ;Is stack empty ?
  456.     SHLD    J        ;No, continue sorting
  457.     SHLD    LAST        ;J=LAST=HL
  458.     POP    H        ;HL=stack
  459.     SHLD    I
  460.     SHLD    FIRST        ;I=FIRST=HL
  461.     CALL    SPLIT
  462.     LHLD    I
  463.     XCHG            ;DE=I
  464.     LHLD    FIRST        ;HL=FIRST
  465.     CPHL
  466.     JZ    SORT4        ;Is I=FIRST ?
  467.     PUSH    H        ;No, stack new I
  468.     DCX    D
  469.     DCX    D
  470.     PUSH    D        ;stack new J
  471. SORT4:    LHLD    J
  472.     XCHG            ;DE=J
  473.     LHLD    LAST        ;HL=LAST
  474.     CPHL
  475.     JZ    SORT8        ;Is J=LAST ?
  476.     INX    D        ;No
  477.     INX    D
  478.     PUSH    D        ;stack new I
  479.     PUSH    H        ;stack new J
  480. SORT8:    JMP    SORT2
  481.     ;
  482.     ;SPLIT subroutine does a single
  483.     ;partition on an array of pointers
  484.     ;
  485. SPLIT:    HALF    I
  486.     XCHG            ;DE=I/2
  487.     HALF    J        ;HL=J/2
  488.     DAD    D        ;HL=(I+J)/2
  489.     MOV    A,L
  490.     ANI    0FEH
  491.     MOV    L,A
  492.     SHLD    K        ;K=(I+J)/2 forced to even number
  493.     DLOAD    PDIR,K
  494.     SHLD    W        ;W=PDIR(K)
  495. SPLIT2:    DLOAD    PDIR,I
  496.     XCHG            ;DE=PDIR(I)
  497.     LHLD    W        ;HL=.(partition element) i.e. PDIR(K)
  498.     MATCH    ,,11        ;Compare keys
  499.     JP    SPLIT4        ;Is DIRBUF(PDIR(I)) < DIRBUF(PDIR(K)) ?
  500.                 ;Yes (or is it No ?)
  501.     INDEX    I,2        ;I=I+2 (bytes i.e. 1 element)
  502.     JMP    SPLIT2
  503.     ;
  504. SPLIT4:    DLOAD    PDIR,J
  505.     XCHG            ;DE=PDIR(J)
  506.     LHLD    W        ;HL=.(partition element) i.e. PDIR(K)
  507.     XCHG            ;swap DE with HL
  508.     MATCH    ,,11        ;compare keys
  509.     JP    SPLIT6        ;Is DIRBUF(PDIR(K) < DIRBUF(PDIR(K)) ?
  510.                 ;Yes (or is it No ?)
  511.     INDEX    J,-2        ;J=J-2 (bytes i.e. 1 element)
  512.     JMP    SPLIT4
  513.     ;
  514. SPLIT6:    LHLD    I
  515.     XCHG            ;DE=I
  516.     LHLD    J        ;HL=J
  517.     CPHL
  518.     RZ            ;Is I=J ?
  519.     DLOAD    PDIR,I        ;No, switch pointers
  520.     SAVE    H
  521.     DLOAD    PDIR,J
  522.     DSTORE    PDIR,I        ;PDIR(J)=PDIR(J)
  523.     RESTORE    H
  524.     DSTORE    PDIR,J        ;and vice versa
  525.     JMP    SPLIT2
  526.     ;
  527.     ; Data Area
  528.     ;
  529. DRIVEID:    DS    1        ;ASCII drive id
  530. ALLF:    DS    1        ;ALL Files printed Flag
  531. SFF:    DB    0        ;Screen full flag (init to 0 i.e. false)
  532. SPACE:    DB    ' $'        ;ASCII Space
  533. CRLF:    DB    0DH,0AH,24H    ;ASCII CR LF
  534. I:    DW    0        ;pseudo index register
  535. J:    DW    0        ;pseudo index register
  536. K:    DW    0        ;pseudo index register
  537. FIRST:    DW    0        ;start of Array
  538. LAST:    DW    0        ;end of Array
  539. W:    DW    0        ;storage for partition index
  540. LINE:    DW    0        ;line number for listing
  541. IPOINT:    DW    0        ;variable buffer pointer
  542. COUNT:    DW    0        ;count of directory entries
  543. FCBCNT:    DW    0        ;count of directory entries used
  544. INBPTR:    DW    0        ;pointer to input buffer
  545. OUTBPTR:
  546.     DW    0        ;pointer to directory buffer
  547. CCPSTK:    DW    0        ;saved CCP stack pointer
  548.     ;
  549. ENDSTK:    DS    ENTRIES*20+10    ;local stack area
  550. LCLSTK:                ;local top of stack (initial)
  551.     ;
  552. PDIR    DS    DIRLEN        ;pointer table to directory buffer
  553.     ;
  554. DIRBUF:    DS    ENTRIES*16    ;directory buffer
  555.     ;
  556.     END    BEGIN
  557.